const Person = function(name) {
    // 请先写出这个方法。其他方法的写法与这个类似
    let fullName = name;

    this.getFirstName = () => fullName.split(/\s+/)[0];
    this.getLastName = () => fullName.split(/\s+/)[1];
    this.getFullName = () => fullName;
    this.setFirstName = first => {
        fullName = fullName.split(/\s+/);
        fullName[0] = first;
        fullName = fullName.join(" ");
    };
    this.setLastName = last => {
        fullName = fullName.split(/\s+/);
        fullName[1] = last;
        fullName = fullName.join(" ");
    };
    this.setFullName = full => (fullName = full);
};

const bob = new Person("Bob Ross");
bob.getFullName();
